<?php
require_once 'mysql.php' ;
require_once 'config.php' ;
if (!empty($_GET["menu"])) header("Location: index.php?menu=".$GLOBALS['startPage']);
function mybody($menu)
{
	
	$body = '<div class="title"><p>Available songs</p></div>';
	$body .= '<div class="menu">Menu<ul>';
	$body .= '<li>List of songs</li>';
	$body .= '<li>Add a new song</li>';
	$body .= '</ul></div>';
	$body .= '<div class="main">';
	
	if ($_GET["menu"]== 1) $body=listsongs();
	//if ($_GET["menu"]== 2) $body=listsongs();
	$body .= '</div>';
}
function listsongs()
{
	$body .= '<ul>';
	while($s = mysql_fetch_object(query('SELECT * FROM tablatures')))
	{
		$body .= '<li>'.$s->band.' - '.$s->song.'</li>';
	}
	$body .= '</ul>';
}

?>
